autolaunch gdb#7
Conversation
We might not want this for cases where you do want to see dmesg output, but you can always run lx-dmesg in gdb. Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
| -kernel "${KERNEL}" \ | ||
| -m "${QEMU_RAM:=512m}" \ | ||
| -nodefaults \ | ||
| -s -S & |
There was a problem hiding this comment.
I couldn't figure a good way to conditionally add the &. Maybe there's a better way than this quick and dirty code duplication?
There was a problem hiding this comment.
This should be good enough. The only improvement I can think of is using a variable for common qemu parameters for debug/non-debug run.
There was a problem hiding this comment.
I do not think we can conditionally add the & but we could probably split the whole ${QEMU[@]} ... invocation into another function like run_qemu or something like that then rename this function do_testing or something like that, since it is not longer JUST invoking QEMU.
No idea if that will work but might be worth testing.
| -kernel "${KERNEL}" \ | ||
| -m "${QEMU_RAM:=512m}" \ | ||
| -nodefaults \ | ||
| -s -S & |
There was a problem hiding this comment.
I do not think we can conditionally add the & but we could probably split the whole ${QEMU[@]} ... invocation into another function like run_qemu or something like that then rename this function do_testing or something like that, since it is not longer JUST invoking QEMU.
No idea if that will work but might be worth testing.
| case $yn in | ||
| [Yy]* ) break ;; | ||
| [Nn]* ) exit 0 ;; | ||
| * ) break ;; |
There was a problem hiding this comment.
We should probably start using some sort of shell formatter like we use YAPF for the Python code in tc-build since I use 4 spaces and you use 2 and I frequently have to adjust my thinking in the CI repo. Should just make it brainless.
Not going request a change, just merely a meta comment.
@msfjarvis: Don't you use a formatter for your scripts?
There was a problem hiding this comment.
on: [push, pull_request]
name: Check script formatting
jobs:
shfmt-check:
name: shfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go
restore-keys: |
${{ runner.os }}-go-
- name: Install shfmt
run: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
- name: Run shellcheck.
run: PATH=$HOME/go/bin:$PATH shfmt -d -i 2 ${SCRIPTS_TO_TEST}this should be enough to error out in case of violations and get everything to 2 space indent.
There was a problem hiding this comment.
eh, sorry, I'll reformat to 4 spaces
|
tried a helper function, and shared list, but ran into issues and it's late. Merged, can follow up if necessary. |
We might not want this for cases where you do want to see dmesg output,
but you can always run lx-dmesg in gdb.
Signed-off-by: Nick Desaulniers ndesaulniers@google.com